Platform Explorer / Nuxeo Platform LTS 2017 9.10

Component org.nuxeo.ecm.platform.picture.jsf.layouts

Contributions

XML Source

<?xml version="1.0"?>
<component name="org.nuxeo.ecm.platform.picture.jsf.layouts">

  <require>org.nuxeo.ecm.platform.forms.layouts.webapp.summary</require>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="widgettypes">

    <widgetType name="picture_view">
      <configuration>
        <sinceVersion>5.7.2</sinceVersion>
        <title>Picture view</title>
        <description>
          <p>
            The picture_view widget displays the configured View of a document
            having the Picture facet.
          </p>
          <p>
            It requires the following fields configuration: first field maps
            the document model.
          </p>
        </description>
        <handlingLabels>true</handlingLabels>
        <properties>
          <layouts mode="view">
            <layout name="picture_view_widget_type_properties_view">
              <rows>
                <row>
                  <widget>pictureView</widget>
                </row>
                <row>
                  <widget>width</widget>
                </row>
                <row>
                  <widget>height</widget>
                </row>
              </rows>
              <widget name="pictureView" type="selectOneListbox">
                <labels>
                  <label mode="any">Picture view</label>
                </labels>
                <helpLabels>
                  <label mode="any">
                    The name of the picture view, defaults to
                    'Medium'.
                  </label>
                </helpLabels>
                <fields>
                  <field>pictureView</field>
                </fields>
                <selectOptions>
                  <option itemLabel="Medium (default value)" itemValue="Medium" />
                  <option itemLabel="Small" itemValue="Small" />
                  <option itemLabel="Thumbnail" itemValue="Thumbnail" />
                  <option itemLabel="OriginalJpeg" itemValue="OriginalJpeg" />
                </selectOptions>
              </widget>
              <widget name="width" type="int">
                <labels>
                  <label mode="any">Width</label>
                </labels>
                <helpLabels>
                  <label mode="any">
                    The width of the image.
                  </label>
                </helpLabels>
                <fields>
                  <field>width</field>
                </fields>
              </widget>
              <widget name="height" type="text">
                <labels>
                  <label mode="any">Height</label>
                </labels>
                <helpLabels>
                  <label mode="any">
                    The height of the image.
                  </label>
                </helpLabels>
                <fields>
                  <field>height</field>
                </fields>
              </widget>
            </layout>
          </layouts>
        </properties>
        <categories>
          <category>summary</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">/widgets/picture_view_widget_template.xhtml</property>
    </widgetType>

    <widgetType name="dimensions">
      <configuration>
        <sinceVersion>7.1</sinceVersion>
        <title>Dimensions</title>
        <description>
          <p>
            The dimensions widget displays the dimensions of an image as "{width} x {height}".
          </p>
          <p>
            The first field maps to the width, the second one to the height.
          </p>
        </description>
        <handlingLabels>false</handlingLabels>
        <categories>
          <category>configuration_not_ready</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <fields>
          <list>false</list>
          <complex>false</complex>
          <supportedTypes>
            <type>string</type>
          </supportedTypes>
        </fields>
      </configuration>
      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">/widgets/dimensions_widget_template.xhtml</property>
    </widgetType>

    <widgetType name="picture_additional_formats">
      <configuration>
        <sinceVersion>7.1</sinceVersion>
        <title>Picture additional formats</title>
        <description>
          <p>
            This widget displays the list of additional
            formats for the given Picture document.
          </p>
        </description>
        <handlingLabels>true</handlingLabels>
        <categories>
          <category>summary</category>
        </categories>
        <supportedModes>
          <mode>view</mode>
        </supportedModes>
        <!-- no configurable properties -->
      </configuration>

      <handler-class>
        org.nuxeo.ecm.platform.forms.layout.facelets.plugins.TemplateWidgetTypeHandler
      </handler-class>
      <property name="template">
        /widgets/picture_additional_formats_widget_template.xhtml
      </property>
    </widgetType>

  </extension>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="widgets">

    <widget name="imageFile" type="image">
      <labels>
        <label mode="any">label.file.content</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>file:content</field>
        <field>file:content/filename</field>
      </fields>
    </widget>

    <widget name="summary_picture_view" type="picture_view" />

    <widget name="infoViewPictureView" type="container">
      <handlingLabels>false</handlingLabels>
      <properties widgetMode="any">
        <property name="hideSubLabels">true</property>
        <property name="styleClass">infoViewDocContainer</property>
        <property name="display">block_top</property>
      </properties>
      <subWidgets>
        <widget name="pictureView" type="picture_view" />
      </subWidgets>
    </widget>

    <widget name="summary_picture_info_box" type="info_box" />

    <widget name="picture_info_dimensions" type="dimensions">
      <labels>
        <label mode="any">label.widget.picture.dimensions</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>picture:info/width</field>
        <field>picture:info/height</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="picture_info_format" type="text">
      <labels>
        <label mode="any">label.widget.picture.format</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>picture:info/format</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="picture_info_colorspace" type="text">
      <labels>
        <label mode="any">label.widget.picture.colorSpace</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>picture:info/colorSpace</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="picture_info_depth" type="text">
      <labels>
        <label mode="any">label.widget.picture.depth</label>
      </labels>
      <translated>true</translated>
      <fields>
        <field>picture:info/depth</field>
      </fields>
      <widgetModes>
        <mode value="any">view</mode>
      </widgetModes>
    </widget>

    <widget name="summary_picture_info" type="container">
      <labels>
        <label mode="any">label.header.picture.info</label>
      </labels>
      <translated>true</translated>
      <properties widgetMode="any">
        <property name="hideSubLabels">true</property>
        <property name="display">block_top</property>
      </properties>
      <controls mode="any">
        <control name="handleLabels">true</control>
      </controls>
      <subWidgets>
        <widget name="picture_info" type="layout">
          <properties widgetMode="any">
            <property name="name">picture_info</property>
          </properties>
        </widget>
      </subWidgets>
    </widget>

    <widget name="summary_picture_exif" type="container">
      <labels>
        <label mode="any">label.header.info.exif</label>
      </labels>
      <translated>true</translated>
      <properties widgetMode="any">
        <property name="hideSubLabels">true</property>
        <property name="display">block_top</property>
      </properties>
      <controls mode="any">
        <control name="handleLabels">true</control>
      </controls>
      <subWidgets>
        <widget name="exif_info" type="layout">
          <properties widgetMode="any">
            <property name="name">exif_info</property>
          </properties>
        </widget>
      </subWidgets>
    </widget>

    <widget name="summary_picture_iptc" type="container">
      <labels>
        <label mode="any">label.header.info.iptc</label>
      </labels>
      <translated>true</translated>
      <properties widgetMode="any">
        <property name="hideSubLabels">true</property>
        <property name="display">block_top</property>
      </properties>
      <controls mode="any">
        <control name="handleLabels">true</control>
      </controls>
      <subWidgets>
        <widget name="iptc_info" type="layout">
          <properties widgetMode="any">
            <property name="name">iptc_info</property>
          </properties>
        </widget>
      </subWidgets>
    </widget>

    <widget name="summary_picture_additional_formats" type="picture_additional_formats">
      <labels>
        <label mode="any">label.header.picture.additional.formats</label>
      </labels>
      <controls mode="any">
        <control name="requireSurroundingForm">true</control>
        <control name="handleLabels">true</control>
      </controls>
      <widgetModes>
        <mode value="any">#{not empty currentDocumentAsBlobHolder.blob ? 'view' : 'hidden'}</mode>
      </widgetModes>
    </widget>

    <widget name="summary_picture_actions" type="documentActionsWithForms">
      <properties widgetMode="view">
        <property name="category">IMAGE_PROCESSING</property>
        <property name="styleClass">grayBox pictureActions</property>
        <property name="actionStyleClass">button</property>
        <property name="overallDisplay">horizontal_block</property>
        <property name="useAjaxForm">true</property>
        <property name="ignoreTemplateProperty">true</property>
      </properties>
      <widgetModes>
        <mode value="any">#{not empty currentDocumentAsBlobHolder.blob ? 'view' : 'hidden'}</mode>
      </widgetModes>
    </widget>

  </extension>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="actions">

    <action id="summary_picture_view" type="widget" order="50">
      <category>SUMMARY_PANEL_LEFT</category>
      <properties>
        <property name="widgetName">summary_picture_view</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

    <action id="summary_picture_actions" type="widget" order="100">
      <category>SUMMARY_PANEL_LEFT</category>
      <properties>
        <property name="widgetName">summary_picture_actions</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

    <action id="summary_current_document_view">
      <filter-id>notHasPicture</filter-id>
    </action>

    <action id="infoViewPictureView" type="widget" order="100">
      <category>INFO_VIEW_PANEL_LEFT</category>
      <properties>
        <property name="widgetName">infoViewPictureView</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

    <action id="summary_current_document_description">
      <filter-id>notHasPicture</filter-id>
    </action>

    <action id="summary_current_document_states">
      <filter-id>notHasPicture</filter-id>
    </action>

    <action id="summary_current_document_contributors">
      <filter-id>notHasPicture</filter-id>
    </action>

    <action id="summary_picture_info_box" type="widget" order="100">
      <category>SUMMARY_PANEL_RIGHT</category>
      <properties>
        <property name="widgetName">summary_picture_info_box</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

    <action id="summary_picture_info" type="widget" order="200">
      <category>SUMMARY_PANEL_RIGHT</category>
      <properties>
        <property name="widgetName">summary_picture_info</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

    <action id="summary_picture_exif" type="widget" order="220">
      <category>SUMMARY_PANEL_RIGHT</category>
      <properties>
        <property name="widgetName">summary_picture_exif</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

    <!-- deprecated see NXP-16336 -->
    <action id="summary_picture_iptc" type="widget" order="240" enabled="false">
      <category>SUMMARY_PANEL_RIGHT</category>
      <properties>
        <property name="widgetName">summary_picture_iptc</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

    <action id="summary_picture_additional_formats" type="widget" order="300">
      <category>SUMMARY_PANEL_LEFT</category>
      <properties>
        <property name="widgetName">summary_picture_additional_formats</property>
      </properties>
      <filter-id>hasPicture</filter-id>
    </action>

  </extension>

  <extension target="org.nuxeo.ecm.platform.actions.ActionService"
    point="filters">

    <filter id="notHasPicture">
      <rule grant="false">
        <facet>Picture</facet>
      </rule>
    </filter>

    <filter id="hasPicture">
      <rule grant="true">
        <facet>Picture</facet>
      </rule>
    </filter>

    <filter id="denyInfoViewPreview" append="true">
      <rule grant="false">
        <facet>Picture</facet>
      </rule>
    </filter>

  </extension>

  <extension target="org.nuxeo.ecm.platform.forms.layout.WebLayoutManager"
    point="layouts">

    <!-- deprecated since 5.6 -->
    <layout name="picture_summary_layout">
      <templates>
        <template mode="any">/layouts/layout_summary_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>summary_picture_view</widget>
          <widget>summary_current_document_files</widget>
          <widget>summary_current_document_comments</widget>
        </row>
        <row>
          <widget>summary_current_document_description</widget>
          <widget>summary_current_document_states</widget>
          <widget>summary_current_document_contributors</widget>
          <widget>summary_current_document_custom_actions</widget>
          <widget>summary_current_document_tagging</widget>
          <widget>summary_current_document_relations</widget>
        </row>
        <row>
          <widget>summary_current_document_publications</widget>
        </row>
        <row>
          <widget>summary_current_document_single_tasks</widget>
        </row>
      </rows>
    </layout>

    <layout name="picture">
      <templates>
        <template mode="any">/layouts/layout_default_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>imageFile</widget>
        </row>
      </rows>
    </layout>

    <layout name="exif_info">
      <templates>
        <template mode="any">/layouts/layout_default_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>date_time_original</widget>
        </row>
        <row>
          <widget>pixel_xdimension</widget>
        </row>
        <row>
          <widget>pixel_ydimension</widget>
        </row>
        <row>
          <widget>orientation</widget>
        </row>
        <row>
          <widget>equipment</widget>
        </row>
        <row>
          <widget>fnumber</widget>
        </row>
        <row>
          <widget>exposure_time</widget>
        </row>
        <row>
          <widget>iso_speed_ratings</widget>
        </row>
      </rows>
      <widget name="date_time_original" type="datetime">
        <translated>true</translated>
        <fields>
          <field>imd:date_time_original</field>
        </fields>
        <properties widgetMode="view">
          <property name="pattern">#{nxu:basicDateFormatter()}</property>
        </properties>
        <properties widgetMode="edit">
          <property name="format">#{nxu:basicDateFormatter()}</property>
          <property name="styleClass">dataInputTextDate</property>
        </properties>
      </widget>
      <widget name="pixel_xdimension" type="text">
        <translated>true</translated>
        <fields>
          <field>imd:pixel_xdimension</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="pixel_ydimension" type="text">
        <translated>true</translated>
        <fields>
          <field>imd:pixel_ydimension</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="orientation" type="text">
        <translated>true</translated>
        <fields>
          <field>imd:orientation</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="equipment" type="text">
        <translated>true</translated>
        <fields>
          <field>imd:equipment</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="fnumber" type="text">
        <translated>true</translated>
        <fields>
          <field>imd:fnumber</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="exposure_time" type="text">
        <translated>true</translated>
        <fields>
          <field>imd:exposure_time</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="iso_speed_ratings" type="text">
        <translated>true</translated>
        <fields>
          <field>imd:iso_speed_ratings</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
    </layout>

    <layout name="iptc_info">
      <templates>
        <template mode="any">/layouts/layout_default_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>object_name</widget>
        </row>
        <row>
          <widget>headline</widget>
        </row>
        <row>
          <widget>keywords</widget>
        </row>
        <row>
          <widget>date_created</widget>
        </row>
        <row>
          <widget>country_or_primary_location</widget>
        </row>
        <row>
          <widget>province_or_state</widget>
        </row>
        <row>
          <widget>city</widget>
        </row>
        <row>
          <widget>caption</widget>
        </row>
        <row>
          <widget>by_line</widget>
        </row>
        <row>
          <widget>by_line_title</widget>
        </row>
        <row>
          <widget>copyright_notice</widget>
        </row>
        <row>
          <widget>credit</widget>
        </row>
        <row>
          <widget>source</widget>
        </row>
        <row>
          <widget>writer</widget>
        </row>
      </rows>
      <widget name="caption" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:caption</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="country_or_primary_location" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:country_or_primary_location</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="province_or_state" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:province_or_state</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="city" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:city</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="by_line" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:by_line</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="by_line_title" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:by_line_title</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="copyright_notice" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:copyright_notice</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="credit" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:credit</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="date_created" type="datetime">
        <translated>true</translated>
        <fields>
          <field>iptc:date_created</field>
        </fields>
        <properties widgetMode="view">
          <property name="pattern">#{nxu:basicDateFormatter()}</property>
        </properties>
        <properties widgetMode="edit">
          <property name="format">#{nxu:basicDateFormatter()}</property>
          <property name="styleClass">dataInputTextDate</property>
        </properties>
      </widget>
      <widget name="headline" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:headline</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="keywords" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:keywords</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="object_name" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:object_name</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="source" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:source</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
      <widget name="writer" type="text">
        <translated>true</translated>
        <fields>
          <field>iptc:writer</field>
        </fields>
        <properties widgetMode="edit">
          <property name="styleClass">dataInputText</property>
        </properties>
      </widget>
    </layout>

    <layout name="picture_info">
      <templates>
        <template mode="any">/layouts/layout_default_template.xhtml</template>
      </templates>
      <rows>
        <row>
          <widget>picture_info_dimensions</widget>
        </row>
        <row>
          <widget>picture_info_format</widget>
        </row>
        <row>
          <widget>picture_info_colorspace</widget>
        </row>
        <row>
          <widget>picture_info_depth</widget>
        </row>
      </rows>
    </layout>

  </extension>

</component>